package com.qfedu.dao;

import com.qfedu.pojo.MyProduct;
import com.qfedu.pojo.Product;

import java.math.BigDecimal;
import java.sql.Connection;
import java.util.List;

public interface ProductDao {
    List<MyProduct> findMyProduct(String idcode);

    List<Product> findAllProducts();

    Product findProductById(int id);

    void addMyProductById(Connection connection, String idcode, int pid, BigDecimal pnum);

    MyProduct findMyProductByOnly(int id);

    int deleteMyProductById(Connection connection, Integer id);

    int updateMyProductById(Connection connection, Integer id, int leftNum);

    BigDecimal backAllProductsPrice(String idcode);

}
